<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/10/11
  Time: 8:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.0.js"></script>
</head>
<script>
    function f(){
        history.back();
    }
    $(function (){

        $("#btn").click(function () {
            let elementsByName=$("input[type='radio']:checked").val();
            var pnum=$("#pnum").val();
            var password=$("#password").val();
            var back=$("#back").val();
            var pname=$("#pname").val();
            location.href="/loanServlet?action=isLoan&loan_f="+elementsByName+"&pnum="+pnum+"&password="
                +password+"&back="+back+"&pname="+pname;

        })
    })

</script>

<body>
    <span style="color: gray" onclick="f()"><</span>&nbsp;&nbsp;&nbsp;<span style="display:inline-block;width:200px;font-weight:bold;"><h2>贷款</h2></span>
    <hr>
<%--    <form action="${pageContext.request.contextPath}/loanServlet?pid=${MyLoan.pid}" method="post">--%>
        <input type="hidden" name="action" value="isLoan">
        <span style="color: red">${msg}</span><br>
        <span>产品名称：</span><input type="text" readonly value="${MyLoan.pname}" id="pname"><br>
        <span>收款账户：</span><input type="text" readonly value="${MyAccount.phone}"><br>
        <span>支付密码：</span><input type="password" id="password" value="" ><br>
        <span>当前余额：${MyAccount.money}</span><br>
        <span>请输入贷款金额：</span>
        <input type="text" id="pnum" value="" ><br>
    <span>请输入贷款天数：</span>
    <input type="text" id="back" value="" ><br>
        <span>还款法：</span>
        <input type="radio" name="loan" value="1" >等额本金<input type="radio" name="loan" value="2" >等额本息
        <button id="btn" >提交</button>
    <%--        <input type="submit" value="提交">--%>
<%--    </form>--%>


</body>
</html>
